
<template>
    <div class="header">
        <textarea cols="105" rows="4" placeholder="请输入bug的描述" v-model="desc"></textarea>
        <br>
        <button class="small green button" @click="saveBug">保存</button>
    </div>
</template>


<script>
 export default{
        name: "BugHeader",
        data(){
            return{
                desc: ""
            }
        },
        methods:{
            saveBug(){
                // 这里可以添加保存bug的逻辑
                let bugObg = {
                    id: Math.random(),
                    description: this.desc,
                    resolved: false
                }
                console.log(bugObg);
            }
        }
    }
</script>
<style scoped>
/* 组件特有样式 */
.bug-header {
  background: white;
  padding: 15px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

.bug-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  resize: vertical;
}

</style>